package com.senlingspace.system.mapper;

import java.util.List;

import com.senlingspace.system.domain.SlkjOrderPricingSnapshot;
import org.apache.ibatis.annotations.Param;

/**
 * 订单价格快照Mapper接口
 *
 * @author SenlingSpace
 * @date 2024-08-01
 */
public interface SlkjOrderPricingSnapshotMapper {

    /**
     * 新增
     *
     * @param orderPricingSnapshot
     * @return int
     */
    int insert(SlkjOrderPricingSnapshot orderPricingSnapshot);

    /**
     * 根据id查询
     *
     * @param id
     * @return {@link SlkjOrderPricingSnapshot }
     */
    SlkjOrderPricingSnapshot selectById(Long id);

    /**
     * 根据订单id查询
     *
     * @param orderId
     * @return {@link List }<{@link SlkjOrderPricingSnapshot }>
     */
    List<SlkjOrderPricingSnapshot> selectByOrderId(Long orderId);

    /**
     * 修改
     *
     * @param orderPricingSnapshot
     * @return int
     */
    int update(SlkjOrderPricingSnapshot orderPricingSnapshot);

    /**
     * 批量新增
     *
     * @param snapshots
     * @return int
     */
    int batchInsert(@Param("list") List<SlkjOrderPricingSnapshot> snapshots);


    List<SlkjOrderPricingSnapshot> selectByOrderIds(@Param("orderIds") List<Long> orderIds);

    List<SlkjOrderPricingSnapshot> selectByOrderIdList(Long orderId);

    /**
     * 根据店铺id查询
     *
     * @param shopId
     * @return
     */
    List<SlkjOrderPricingSnapshot> selectSnapByShopId(@Param("shopId") Long shopId);

    List<SlkjOrderPricingSnapshot> selectGoodsByOrderIds(@Param("orderIds")List<Long> orderIds);

    List<SlkjOrderPricingSnapshot> selectByOrder(Long orderId);
}
